#1,permission gruop 管理
from rest_framework.generics import ListAPIView
from rest_framework.viewsets import ModelViewSet
from django.contrib.auth.models import Group,Permission
from meiduo_admin.my_paginate import MyPageNumberPagination
from meiduo_admin.sysmange import permission_group_serializers

#1,permission gruop 管理
class PermissionGroupViewSet(ModelViewSet):
    pagination_class = MyPageNumberPagination
    serializer_class = permission_group_serializers.PermissionGroupSerializer
    queryset = Group.objects.all()

class PermissionSimpleView(ListAPIView):
    serializer_class = permission_group_serializers.PermissionSimpleSerializer
    queryset = Permission.objects.all()